import Redis from "ioredis"

declare global {
    var redis: Redis | undefined;
}


// export const redis = globalThis.redis || new Redis(process.env.REDIS_URL!);
export const redis = undefined;

// nextjs hot reload 将会创建多个redis实例。
if (process.env.NODE_ENV === 'development') globalThis.redis = redis;
